import Home from './views/Home.vue'

let routes = [
    {
        path: '/login',
        component: () => import('@/views/Login.vue'),
        name: '',
        hidden: true
    },
    {
        path: '/404',
        component: () => import('@/views/404.vue'),
        name: '',
        hidden: true
    },
    {
        path: '/',
        component: Home,
        name: '',
        iconCls: 'fa fa-tv',
        leaf: true,//只有一个节点
        children: [
            { path: '/index', component: () => import('@/views/index/index.vue'), name: '工作台' }
        ],
        redirect: { path: '/index' }
    },
    {
        path: '/',
        component: Home,
        name: '',
        iconCls: 'fa fa-user-circle',
        leaf: true,//只有一个节点
        children: [
            { path: '/customerManage', component: () => import('@/views/customerManage/index.vue'), name: '用户管理' },
            { path: '/cardPage', component: () => import('@/views/cardPage/index.vue'), name: '名片详情', hidden: true }
        ]
    },
    {
        path: '/',
        component: Home,
        name: '企业管理',
        iconCls: 'fa fa-address-card',
        children: [
            { path: '/companyManage', component: () => import('@/views/companyManage/index.vue'), name: '企业管理' },
            { path: '/companyCardPage', component: () => import('@/views/companyCardPage/index.vue'), name: '企业详情', hidden: true },
            { path: '/companyVideo', component: () => import('@/views/companyVideo/index.vue'), name: '短视频管理' },
            { path: '/permissionsManage', component: () => import('@/views/permissionsManage/index.vue'), name: '权限管理' },
            { path: '/operationRecords', component: () => import('@/views/operationRecords/index.vue'), name: '操作记录' }
        ]
    },
    {
        path: '/data',
        component: Home,
        name: '数据中心',
        iconCls: 'fa fa-bar-chart',
        children: [
            { path: '/data/yimaiSmartCard', component: () => import('@/views/YimaiSmartCard/index.vue'), name: '壹脉智能名片' },
            { path: '/data/yimaiCrmCard', component: () => import('@/views/YimaiCrmCard/index.vue'), name: '壹脉智能CRM' }
        ]
    },
    {
        path: '/',
        component: Home,
        name: '小程序管理',
        iconCls: 'fa fa-file-text',
        children: [
            { path: '/codeManage', component: () => import('@/views/codeManage/index.vue'), name: '代码管理' },
            { path: '/versionManage', component: () => import('@/views/versionManage/index.vue'), name: '小程序版本管理' },
            { path: '/wxappletManage', component: () => import('@/views/wxappletManage/index.vue'), name: '小程序管理' }
        ]
    },
    {
        path: '/',
        component: Home,
        name: '',
        iconCls: 'fa fa-envelope-o',
        leaf: true,//只有一个节点
        children: [
            { path: '/companyNotice', component: () => import('@/views/companyNotice/index.vue'), name: '更新公告' },
        ],
        redirect: { path: '/index' }
    },
    {
        path: '*',
        hidden: true,
        redirect: { path: '/404' }
    }
]

export  default routes

// export const constantRouterMap = [
//     {
//         path: '/',
//         redirect: '/login'
//     },
//     {
//         path: '/login',
//         component: () => import('@/views/Login.vue'),
//         name: '',
//         hidden: true
//     },
//     {
//         path: '/404',
//         component: () => import('@/views/404.vue'),
//         name: '',
//         hidden: true
//     },
// ]

// export const asyncRouterMap = [

// ]
